<?php
//数据库连接
function database(){
    require_once("./lib/mysql.class.php");

    $configArr = array(
        'host'     => 'localhost',
        'port'     => '3306',
        'user'     => 'root',
        'passwd' => '',
        'dbname'   => 'yy',
    );

    return $mysql = new MMYsql($configArr);
}
?>